package com.authine.cloudpivot.ext.dto.model.invoice;

import com.authine.cloudpivot.ext.dto.model.trade.Trade;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Builder
@Schema(description = "")
public class InvoiceDetail {

    @Schema(description = "")
    private String id;
    /**
     * 开票申请ID
     */
    @Schema(description = "")
    private String invoice_apply_id;
    /**
     * 交易记录Id
     */
    @Schema(description = "")
    private String trade_id;

    /**
     * 账单ID
     */
    @Schema(description = "")
    private String bill_id;

    /**
     * 金税ID
     */
    @Schema(description = "")
    private String golden_tax_id;

    /**
     * 核销的结算单ID
     */
    @Schema(description = "")
    private String settle_id;

    /**
     * 红票明细对应的蓝票明细ID
     */
    @Schema(description = "")
    private String offset_id;

    /**
     * 票面名称 货物或应税劳务，税务名称
     */
    @Schema(description = "")
    private String name;
    /**
     * 票面型号/规格
     */
    @Schema(description = "")
    private String model_spec;

    /**
     * 票面单位
     */
    @Schema(description = "")
    private String unit;
    /**
     * 票面数量
     */
    @Schema(description = "")
    private BigDecimal quantity;
    /**
     * 票面单价（不含税）
     */
    @Schema(description = "票面单价(未税单价)")
    private BigDecimal price;
    /**
     * 单价（含税）
     */
    @Schema(description = "")
    private BigDecimal gross_price;
    /**
     * 票面明细的价格合计【数量*单价】
     */
    @Schema(description = "")
    private BigDecimal amount;
    /**
     * 票面税率
     */
    @Schema(description = "")
    private BigDecimal tax_rate;
    /**
     * 票面税额
     */
    @Schema(description = "")
    private BigDecimal tax;
    /**
     * 明细的价税合计
     */
    @Schema(description = "明细的价税合计(含税总价)")
    private BigDecimal total;
    /**
     * 蓝票被核销的发票数量
     */
    @Schema(description = "")
    private BigDecimal offset_quantity;
    /**
     * 蓝票被核销的发票金额（含税）
     */
    @Schema(description = "")
    private BigDecimal offset_total;
    /**
     * 发票明细扩展字段
     */
    @Schema(description = "")
    private String extends_attr;

    /**
     * 金税分类编码
     */
    @Schema(description = "")
    private String golden_tax;

    /**
     * 明细对应的交易记录
     */
    private Trade trade;



}
